package cn.com.dbappsecurity.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.com.dbappsecurity.entity.Demo;

public interface DemoMapper {

	/**
	 * 添加
	 * @param demo
	 * @return
	 */
	public int insert(Demo demo);
	
	/**
	 * 根据ID删除
	 * @param id
	 * @return
	 */
	public int delete(int id);
	
	/**
	 * 查询
	 * @param id
	 * @return
	 */
	public List<Demo> search(@Param("name")String name,@Param("age")int age,
			@Param("limit")int limit,@Param("offset")int offset);
	
	/**
	 * 查询总条数
	 * @param id
	 * @return
	 */
	public int searchCount(@Param("name")String name,@Param("age")int age);
	
}
